<template>
  <!-- 容器 -->
  <div ref="charts" class="charts"></div>
</template>

<script>
import * as echarts from 'echarts'

export default {
  name: 'BarCharts',
  mounted() {
    // 初始化echarts实例
    const LineEcharts = echarts.init(this.$refs.charts)
    LineEcharts.setOption({
      xAxis: { show: false, type: 'category' },
      yAxis: { show: false },
      // 系列
      series: [
        {
          type: 'bar',
          data: [133, 40, 150, 57, 93, 52, 188, 90, 185, 60, 77, 200],
          color: 'cyan'
        }
      ],
      // 布局
      grid: {
        left: 0,
        right: 0,
        top: 0,
        bottom: 0
      },

      tooltip: {}

    })
  }
}
</script>

<style scoped>
.charts {
  width: 100%;
  height: 100%;
}
</style>
